package com.systop.scos.news.service;

import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;

import org.springframework.stereotype.Service;

import com.systop.core.service.BaseGenericsManager;
import com.systop.scos.news.model.NewsType;
/**
 * 新闻类别维护
 * @author yj
 *
 */
@Service
@SuppressWarnings({ "unchecked", "rawtypes" })
public class NewsTypeManager extends BaseGenericsManager<NewsType> {
	public Map getNewsTypeMap() {
		List<NewsType> newsTypeList = query("from NewsType");
		Map newsTypeMap = new LinkedHashMap();
		for(NewsType nt : newsTypeList){
			newsTypeMap.put(nt.getId(), nt.getName());
		}
		return newsTypeMap;
	}

}
